home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d880.lha
/
Oberon
/
O3Demo1.lzh
/
ReadMe
< prev
next >
Wrap
Text File
|
1993-01-14
|
73KB
|
1,789 lines
13-December-1992
Amiga Oberon-2 3.00 (limited Version)
Introduction:
This is a freely distributable demo version of a powerful Oberon-2 compiler.
Oberon-2 is a modern object-oriented programming language. It's the latest
development of Prof. Dr. Niklaus Wirth and Prof. Dr. Hanspeter Mössenböck
of the Institute for Computer Systems, Swiss Federal Institute of
Technology (ETH Zürich). The language is the result of a project to improve
the performance and to reduce the complexity of Modula-2. Primarily, the
concept of type extension has been added to Oberon, providing object-
oriented programming facilities comparable to those of the languages
Smalltalk and C++. At the same time, Oberon retains the notational
conventions of Modula-2 and Pascal.
This compiler offers some features seldom found in other compilers:
- The compiler performs only a single pass, thereby providing fast
translations. Still, the code produced is short and fast, because the
compiler applies carefully selected optimizations.
- Memory usage is controlled by an incremental garbage-collector. It is
neither necessary nor possible to free allocated memory explicitly. The
garbage-collector inquires memory while the main program is running and
it frees unused objects automatically. This way you have the security
that your program is free of such dangerous bugs as using memory, that
has been freed.
- Object files are BLink-compatible. You may include object files written
in different languages, eg. assembler modules, to your program.
- Unused code is removed by the linker ensuring small executables.
- Programs are very robust at run time, because the compiler employs
a lot of runtime checks to trap errors of many kinds. In most cases,
run time failures do not result in a system failure; rather, they are
captured by the run time system.
- In order to permit access to the functions and resources of the Amiga
operating system, the language has been extended by Amiga specific
types and functions.
- A big library of modules is supplied with the compiler and many library
modules are available within the AMOK-PD-Series (currently 81 disks).
- Any executable Oberon-2 program may be made resident.
- Setting one single compiler option causes the compiler to create fully
reentrant (pure) programs.
- Alternatively, the compiler may create optimized code for the processors
68000, 68010, 68020 and 68030 and for the FPU 68881/68882. The FPU is
fully supported, even its trigonometric functions (SIN, LOGN,..) may be
used directly.
- The compiler supports conditional compilation.
- Symbol files may be kept resident in memory to reduce compilation time.
- A powerful Runtime-Debugger is available for Amiga Oberon-2.
This Oberon-2-System is an ideal tool to develop small and large
applications for the amiga effectively. Code re-use based on module
libraries is supported via the object-oriented features of the language,
and any object previously defined may easily be adapted to new problems.
Limitations of the demo version:
This version of the compiler shall enable you to translate a few Oberon-2
programs and to investigate some of the compiler's features. However, this
is not the full version. A few restrictions have been built into the
compiler which will prevent you from using it over an extended time period.
The idea is to encourage you to purchase the full version (see details
below) if you believe it is worth it to keep me alive. The following
paragraphs list the restrictions build into this demo version.
- Only a small subset of the module library and of the AmigaOS interface
modules are provided.
- The documentation is short and in many ways insufficient.
- The compiler refuses to do its job on mondays.
- The source text of each module must not be longer then 10 KB.
- The program code per module must not be longer then 5 KB.
- No module may have more than 3 KB of global variables.
- For each module, the maximum number of imported modules is restricted
to seven.
- The editor cannot handle more than 200 lines of text.
- You are forced to use the small data model since the object files
supplied with this demo version are created using the small data model.
- You may not disable garbage-collection because the supplied object
files are compiled using the garbage-collector.
- Runtime-errors within programs written with this demo-version do not
yield an error message, they just lead to program termination.
- No more than 50 menu selections may be done within the debugger.
The disks contain the following files:
Disk 1: OberonDemo_3.0_Disk1
ReadMe
: This file.
Oberon-Report
: The Oberon-Report, a text describing the language
oberon, written by N. Wirth of ETH Zürich
ModulaToOberon
: The text "From Modula To Oberon", also from ETH Zürich.
Oberon-2.txt
: Description of the language Oberon-2, written by H.
Mössenböck, ETH Zürich
Install
: Script-File for installation of the compiler
Oberon
: The compiler, it translates source files to object
and symbol files.
OLink
: The linker, it puts together the object files and creates
an executable program.
OEd
: The editor.
OEd_Keys.txt
: Textfile, describes OEd's keyboard settings
OEd_Menu.txt
: Textfile, describes OEd's menu layout
OEdRexxHelp.txt
: Text describing OEd's ARexx commands, this text is
automatically displayed when HELP is pressed within OEd
OErr
: This programs displays error messages created by the
compiler if compilation failed.
Path:
Textfile listing all paths for the compiler and linker
to search for object and symbol files
Error_Messages:
Text file containing the error messages displayed by OEd
or OErr.
ResidentManager:
This tool forces symbol files to be kept resident in
memory once they've been loaded. This increases compile
time on systems with slow harddisk or floppies.
ResidentModules:
Textfile, contains the names of all modules whose symbol
files should be kept resident. 'all' keeps all symbol
files resident.
ODebug:
The runtime debugger.
Icons (dir)
: This drawer contains all icons used for the different
kinds of files. They are used by the compiler, linker,
etc.
libs (dir)
: Necessary libraries:
oberonsupport.library (reads symbol files)
garbagecollector.library (the garbage-collector)
arp.library (filerequester for WB1.3)
ExeIcon
: Program similar to IconX
Disk 2: OberonDemo_3.0_Disk2
Examples (dir)
: Some Oberon-2 examples.
Tetriz
: Small Workbench-Game
sym, obj (dir)
: Symbol- and Objectfiles of supplied modules.
Definitions (dir)
: Definition files of some of the supplied
modules.
All programs of these two disks have been written in Oberon-2 and
compiled using Amiga Oberon-2. They all may be made resident (pure).
Used filename extensions:
The Oberon-Files use the following filename-extensions:
Sourcecode '.mod'
Symbolfile '.sym'
Objectfile '.obj'
Objectfile using small data model '.objs'
Referencefile used by ODebug '.ref'
Executable program ''
Installation of the compiler:
The compiler may easily be installed by double clicking the Icon 'Install'
of the first disk. This installation script copies the required libraries
to your LIBS: drawer and assign the logical director OBERON: to the first
Oberon disk.
If you plan to use the Compiler from within your Shell, you should extend
your 'S:Shell-Startup' by the line 'PATH OBERON: ADD'.
The Editor OEd:
This Editor has been developed in Oberon-2 especially for Oberon-2 program
development. It may easily be used with the mouse, and provides the
following features:
- manipulation of multiple source text files
- Oberon-2 syntax checking
- interactive compilation, linkage, and program execution
- interactive error reporting
- powerful ARexx interface
Starting OEd:
Simply double-click OEd's icon, or type "OEd" in a CLI window. You may
specify text file names as arguments for OEd, or, from the Workbench, you
may make a multiple selection of text files, and then double- click OEd' s
icon while the Shift key is pressed. In this case, each of the selected
text files will automatically be loaded into a separate window.
From the CLI:
OEd {-{i|t#|x#|y#|w#|h#|d#|s|l|u#|a}}
[c-{s|v|b|c|r|n|o|t|p|m|d|1|2|3|8|i|g|y}] {<Text>}
Options are introduced by a minus sign ('-'). The symbol '#' represents a
decimal number.
-i generate icons
-t# set tab width (default = 2)
-x#,-y# top left position of OEd windows
-w#,-h# width and height of OEd windows
-d# depth of OEd screen (default = 2)
-s open on separate screen (default = Workbench)
-l open interlace screen
-u# max. size of undo buffer (default = 50; see below)
-a activate 'Auto Uppercase'; see below
'c-...' introduces the options for the Compiler and the Linker. Their
meanings and defaults are identical to those of the Compiler (see
below).
Example:
OEd -sy11d1u100 Test.mod
This will open a window for the source text 'Test.mod' on a separate, two-
colour OEd screen immediately under the screen' s title bar. The undo
buffer can accept up to 100 entries.
From the Workbench:
Before starting OEd from the Workbench, options may be specified via the
tool types using Workbench function ' Information' or ' Info'. OEd
understands the following tool types:
ICONS generate / don't generate icons (TRUE/FALSE)
TABULATOR tab width
LEFTEDGE, TOPEDGE top left position of OEd windows
WIDTH, HEIGHT width and height of OEd windows
DEPTH depth of OEd screen
SCREEN open on separate screen (TRUE) or on
Workbench screen (FALSE)
INTERLACE open interlace screen
MAXUNDO max. size of undo buffer (see below)
AUTOUPPERCASE enable / disable (TRUE/FALSE) Auto Uppercase; see below
OEd Usage:
The title bar of an OEd window serves as a status line. It displays
important information, eg error messages. Normally, it contains something
like
col: 8 line: 85 of 88 chgs: 205 file: Test.mod
Here, the numbers after col: and line:, respectively, specify the current
cursor position (column 8 in line 85 in this case). The number after of
defines the total number of lines in this text file. The number after
chgs: specifies the number of text modifications since the file has been
saved for the last time. Finally, the name of the file displayed in this
window is given by the string following file:.
The gadgets on the right hand side of an OEd window allow easy movement
through the text file. The large proportional gadget displays the
relative position and size of the visible text, as compared to the whole
text file. It may be used for fast movement in both directions. The
arrow gadgets underneath are provided for line-by-line movement.
Key Definitions and Combinations:
Cursor keys (arrow keys):
With these keys, you can move the cursor to any text position.
Using the horizontal arrow keys together with an Alt key allows you to
move from one word to the next or previous word, while the vertical arrow
keys together with an Alt key provide forward and backward movements
through pages.
Pressing a Shift key as a qualifier permits jumping to the beginning or to
the end, respectively, of the current line (horizontal arrow keys), or of
the whole text file (vertical arrow keys).
The Control (Ctrl) key together with a vertical arrow key scrolls the text
upwards or downwards, respectively, without changing the relative cursor
position inside the window.
Backspace:
Using this key, you may delete the character to the left of the current
cursor position. Backspace is ignored, if the cursor is positioned at the
beginning of a line. Qualifying it with an Alt key results in the whole
word to the left of the cursor being deleted. Pressing the Backspace and
Control keys simultaneously allows you to delete all characters in the
current line which are on the left of the current cursor position.
Del:
The Del key is used to delete the character at the current cursor
position. At the end of a line, pressing the Del key results in a
concatenation of the current line and the next line. You may delete the
word to the right of the cursor by pressing one of the Alt and the Del
keys at the same time. Together with the Control key, all characters to
the right of the current cursor position, including the character at the
current cursor position, are deleted. Pressing one of the Shift and the
Del keys simultaneously deletes the whole line.
Return:
With the Return key, you can insert a new line immediately below the line
containing the cursor. Also, the cursor is moved to the first position of
the new line. Pressing a Shift and the Return keys simultaneously splits
the current line into two lines at the current cursor position.
TAB:
Pressing the Tab key takes you to the next, or if one of the Shift keys is
pressed simultaneously, to the previous, tab stop. The distance between
tab stops is normally two character positions. The tab distance may be
modified at OEd startup, using option '-t#'.
Escape (Esc):
This key reduces the active OEd window to its minimum size and puts it in
the background. In this way, you can avoid cluttering the screen. The
Escape key is a toggle, so pressing it again brings the active OEd window
back to its original size and position.
Pressing one of the Shift and the Escape keys simultaneously allows you to
cycle through all of the OEd windows. OEd windows are activated and
brought to the foreground in sequence, even if OEd has been activated more
than once. This function allows you to move from one text window to
another, without using the mouse.
Function Keys F1..F5:
Pressing a Shift key and one of these function keys simultaneously allows
you to associate the current line with a marker. If the same function
key (without a Shift key) is pressed subsequently, the cursor jumps back
to the line previously marked.
Amiga + '0'..'9','A'..'Z':
Most of the menu items (see below) may also be selected by pressing the
right Amiga key and a letter or digit key simultaneously.
The Mouse:
You may move the cursor to any text position by moving the mouse pointer
there and clicking the left mouse button.
To mark a block of text with the mouse, keep the left mouse button pressed
and move horizontally or vertically until you have reached the end of the
block. Now release the mouse button. There are various operations with
blocks of text; see further below.
The Menus:
The Project Menu:
Load (Amiga + 'L'):
This function opens a file requester for entering a new file name. If the
file currently displayed was modified, but has not been saved yet, you
will be asked if you wish to save the current file, before the file
requester is displayed.
New Window (Amiga + 'W'):
This function opens a new, empty window in which another text file may be
displayed.
Save (Amiga + 'S'):
The text file is saved under the name displayed in the status line. If a
file with the same name already exists, it is given a new name first ( by
appending '.bak'). Consequently, if the system crashes while the file is
being saved, the old file still exists. Only after the file has been
saved successfully, the old file is removed.
Save As (Amiga + 'V'):
This function opens a file requester, so that you can save the currently
active text file under any name of your choice.
Save block (Amiga + 'O'):
The block previously selected with the mouse or the block menu is saved.
A file requester is displayed allowing you to specify a file name. This
function has no effect if the marked block is smaller than one line.
Insert File (Amiga + 'I'):
This function inserts a text file before the line containing the cursor.
A file requester is displayed allowing you to specify a file name.
Print (Control + 'P'):
Sends the text to the printer using the settings selected with the printer
preferences program.
Print Block (Control + 'B'):
Sends the selected block to the printer.
Print As (Control + 'I'):
A requester allowing you to select a left margin, print quality ( NLQ or
Draft), pitch (normal or condensed) and line spacing ( 6 or 8 lines per
inch) is brought up. Pressing the Return key or selecting the OK gadget
starts printing the file using the selected style.
Print Block As (Control + 'O'):
This function is similar to Print As with the difference that the selected
block is printed.
Hide (Control + ESC):
The currently active OEd-Window will be closed ( hidden). It may be re-
opened using Reveal. At least one window has to remain open.
Reveal (Control + 'V'):
A requester is displayed. You may chose one opened text file with the
mouse or the the vertical arrow keys. Selecting the Return key or the OK
gadget will open that text's window, if it was closed using Hide, else its
window will jump in front of all other windows.
Screen Mode (Control + 'D'):
This function will only work on Amigas with AmigaOS 2.0 installed. It will
open a requester to select the display mode OEd should use. Information
about the selected mode will be saved in a file named ' Oberon: ScreenMode'.
This mode will be used the next time OEd is started on a separate screen.
About (Amiga + 'J'):
Information about the version and the author of OEd is displayed.
Quit (Amiga + 'Q'):
The active window is closed. If the text file was modified, you will be
asked if you wish to save the file. Any other windows previously opened
via New Window, or corresponding parameters at OEd start, remain opened.
The Search Menu:
Find (Amiga + 'F'):
A window is opened containing a string gadget where you may enter a search
string. Three further gadgets specify search modes: case sensitive versus
not case sensitive, forward versus backwards, and character by character
versus word by word. A word-by- word search is limited to letters and
digits.
After pressing the Return key or the OK gadget, the text is searched for
the string, starting at the current cursor position. If the string
exists, then the cursor is positioned at its beginning. Otherwise, the
screen will flash.
Next (Amiga + 'N'):
This function searches forward for the next occurrence of the string
previously specified with Find.
Previous (Amiga + 'P'):
This function searches backwards for the next occurrence of the string
previously specified with Find.
FindRep (Amiga + 'G'):
FindRep is similar to Find. It opens a window containing two string
gadgets, where a search string and a replacement string, respectively, may
be entered. There is another gadget which allows you to specify whether
all occurrences of the search string shall be substituted ( all), or only
the next one (single). Substitution commences when the Return key is
pressed in the second string gadget, or when the OK gadget is selected.
If all was selected, the cursor jumps to the next occurrence of the search
string. Then a small window is displayed which lets you decide whether to
perform the current substitution ( yes!), or to skip the current
substitution ( no!), or to perform the current and all further
substitutions automatically (all), or to terminate substitution (Cancel).
Instead of clicking a gadget, you may press one of the keys y, n, a, or C (
first letter of each option).
NextRep (Amiga + 'R'):
This function searches forward for the next occurrence of the search
string previously specified with FindRep, and substitutes it with the
replacement string.
PrevRep (Amiga + 'H'):
This function searches backwards for the next occurrence of the search
string previously specified with FindRep, and substitutes it with the
replacement string.
Find Word (Alt + 'F'):
This function takes the word at the current position as search string and
searches forward the next occurrence of this string.
The Block Menu:
Begin (Amiga + 'B'):
This function removes the marking of a previously defined block, if any,
and defines the line containing the cursor as the block start.
End (Amiga + 'E'):
The end of block mark is set to the line currently containing the cursor.
The block thus defined is highlighted. In the following, this block is
referred to as the marked block. A block may alternatively be marked
using the mouse (also refer to section "The Mouse" above).
If this menu item is selected while a marked block already exists, then
the block is extended up to and including the current line.
If End is selected while the cursor is within the line previously marked
using Begin, a horizontal block that consists of a part of the line will
be marked.
Copy Block (Amiga + 'Y'):
This function inserts a copy of the marked block before the line
containing the cursor or at the cursor position if it' s a horizontal
block. The original block remains unchanged.
Move (Amiga + 'M'):
This function inserts a copy of the marked block at the cursor position as
it's done by Copy Block. Additionally, the original block is removed.
Delete (Amiga + 'D'):
This function deletes the marked block.
Cut (Alt + 'X'):
The marked block is removed and put in the clipboard's buffer.
Copy (Alt + 'C'):
A copy of the marked block is put in the clipboard's buffer. The original
block remains unchanged.
Paste (Alt + 'V'):
The block previously put into the clipboard's buffer is inserted at the
current cursor position.
TAB right (Control + 'R'):
The marked block is moved to the right by the specified tab width
(normally 2).
TAB left (Control + 'L'):
The marked block is moved to the left by the specified tab width.
Unmark (Amiga + 'U'):
This function unmarks a block. The block itself is not changed; rather,
the highlighting is removed, and the block is therefore no longer marked.
The Special Menu:
Enter Rexx Cmd (Control + 'E'):
A window is opened which allows you to type a short ARexx command
sequence. Pressing the Return key or clicking the OK gadget causes the
command sequence to be executed immediately, provided, of course, that
ARexx is properly installed.
The command sequence is executed asynchronously, ie you can continue using
OEd while the ARexx program is running.
Example:
DO i=1 TO 10; 'write' i; 'return'; END
This command sequence generates the numbers 1 through 10, and stores each
of them in a separate line of the active OEd window.
Execute Rexx Cmd (Control + 'X'):
The ARexx command sequence entered via Enter Rexx Cmd is executed.
Stop Rexx (HI) (Control + 'C'):
This function allows you to stop an ARexx program previously started with
Enter/Execute Rexx Cmd or a function key. In order to accomplish this,
the program ' HI' ( also refer to ARexx User' s Reference Manual) is
executed. 'HI' must be located in logical device 'C:' or 'REXXC:'.
Stop Rexx is a useful mechanism to interrupt infinite loops in ARexx
command sequences.
Goto Line (Control + 'G'):
A requester is brought up which allows you to type the number of the line
the cursor should go to. Selecting the Return key or the OK gadget will
move the cursor to that line.
Goto Last Change (Control + 'A'):
The cursor will be set to the position at which the last change in the
text file has been made. This is often useful after you have moved
through the text to look something up and want to return to the location
you are currently editing.
Matching Bracket (Control + 'H'):
This command may be executed when the cursor is positioned over a
parenthesis ("(" or ")"), bracket ("[" or "]") or brace ("{" or "}").
The text file will be scanned forward or backwards for the corresponding
parenthesis. The direction in which the cursor is moved depends on
whether it's over an opening or a closing parenthesis.
If there is no corresponding parenthesis, the screen will flash.
Change Case (Alt + 'A');
Changes the case to the character at the current position.
Undo (Control + '<'):
Repeated application of this function allows you to undo the effects of
previous operations in reverse order. Hereby, it does not matter in which
way the text was modified before (eg via typing, searching and replacing,
block operations etc).
The size of the undo buffer specified at OEd start determines how many
previous operations may be undone. Also, different operations require
quite different amounts of space: Eg if a block is deleted, it is stored
in its entirety.
Undo decreases the number of changes indicated in the status line by one.
If undo is executed straight after a save operation, the number of changes
becomes negative, because the text kept by the Editor is older than the
text last saved.
A block mark may be removed by the undo function.
Redo (Control + '>'):
Redo can only be executed straight after an undo operation. It repeats
the operation previously undone, and increases the number of changes
indicated in the status line by one.
Undo All (Control + 'U'):
All changes since the last save operation are undone. However, if the
undo buffer size is not large enough, only the operations stored in it are
undone.
Redo All (Control + 'W'):
Redo All can only be executed straight after Undo or Undo All. All
operations previously undone are re-executed.
Clear All Undos:
This function should only be used if the available amount of memory is
very low. The contents of the undo buffer are cleared, and their memory
is released. Thereafter, the changes made before selecting Clear All Undos
may no more be undone.
Undelete Line (Alt + 'L'):
Inserts the line deleted using <Shift> plus <Del> at the current position.
The Oberon Menu:
The functions of this menu support the development of Oberon-2 programs.
Thus, they cannot reasonably be applied to other types of text files.
Parse (Amiga + 'A'):
The text file is parsed, ie this function investigates if the text adheres
to the syntax rules of the Oberon-2 language, or of the extensions provided
by this Compiler. If a syntax error is found, the cursor is moved to its
location, and a short error message is displayed in the status line.
Parsing is much faster than compilation. It is therefore recommended to
make use of this function before compiling the text. In this way, obvious
syntax errors like omitted END statements or inconsistent use of
parentheses may be detected, before they cause the Compiler to generate
consequential error messages.
Note that parsing does not detect semantic errors, like incompatible types
etc.
Compile (Amiga + 'C'):
This function starts the Oberon-2 Compiler with the name of the currently
active text file as a parameter. The Compiler makes use of the text file
stored in memory, which therefore does not need to be saved to disk before
compilation. It is not possible to continue editing during compilation.
The Compile function as well as the next four functions further below all
assume that the commands CD, STACK, PATH, and RUN exist in logical device
C:. If you have enough memory, then you should make these commands
resident.
Also, logical device T: should exist so that OEd can create a temporary file.
Link (Amiga + 'K'):
This function starts OLink in order to link the program previously compiled.
Make (Control + 'M'):
This function starts OMake with the name of the currently active text file
as parameter.
Execute (Amiga + 'X'):
This function executes the program previously linked. A Workbench start
without parameters is simulated.
Compiler Options (Control + 'T'):
This function allows you to set the options used by conditional compilation.
Next Error (Amiga + 'T'):
If the Compiler detected any errors, then they may be viewed using this
function. Next Error always reports the next error to the right of or
under the current cursor position. The error message is displayed in the
status line. If there are no more errors, then the message ' No more
errors' is displayed.
First Error (Amiga + 'Z'):
This function moves the cursor to the position of the first error
encountered by the Compiler, and reports it in the status line. If there
were no compilation errors, then the message 'No errors' is displayed.
Reload Errorfile (Control + 'Q'):
This function forces OEd to reload the error file created by the compiler.
This is necessary when the text hasn' t been changed but it has been
recompiled and a new error file has been created.
The Options Menu:
This menu allows you to set various compiling, and linking options
interactively.
The Settings Menu:
This menu allows you to set various editing options interactively.
Insert (Amiga + '.'):
If Insert is selected, then the Editor is in insert mode, otherwise in
overwrite mode.
Layout Mode (Amiga + '-'):
Selects layout mode. In layout mode the cursor stays within the current
line if you move it to the left at the beginning or to the right at the end
of the line.
Auto Uppercase (Amiga + ','):
This option, if selected, tells OEd to automatically convert all reserved
words and standard identifiers to upper case. This way you may type '
module' and 'integer' in stead of 'MODULE' and 'INTEGER'.
Create Icons? (Amiga + '0'):
This option, if selected, permits automatic generation of icons.
Set Script Flag?
If selected, the script flag will be set while saving the text.
ARexx Interface:
OEd includes a powerful ARexx interface providing full control over the
Editor more than 140 commands. Of course, this interface can only be used on
Amigas where ARexx is properly installed, and the program ' RexxMast' is
running in the background.
You must be familiar with the Rexx Language and the ARexx Manual in order
to be able to exploit the possibilities of OEd's ARexx interface.
OEd's ARexx port is simply called 'OEd'. There is only a single port even
if OEd is running more than once. The commands sent to this port are
broadcasted to all OEd processes, but picked up only by the process which
owns the currently active window. If no window is currently active, then
the commands are sent to the OEd process which owned the most recent
active window.
A detailed description of OEd's ARexx commands may be found in the manual to
Amiga Oberon-2. For a short summary, read the file 'OEdRexxHelp.txt'.
Menu and keyboard settings:
OEd's menu and keyboard setting are freely configurable by the files
OEdMenu.txt and OEdKeys.txt. For more information you' ll have to obtain
the Manual.
The compiler Oberon:
The program 'Oberon' is the actual compiler which performs most of the
work: It receives the source files developed with OEd ( or a different
ASCII editor), and it generates an external symbol file containing
information about all objects exported by the compiled module, and an
object file containing the generated object code, ie the program.
If the Compiler detects errors in the source file, then it does not
generate the external symbol and object files. Rather, it generates and
stores information about error locations and corresponding error message
numbers in a separate error file.
Compiler Usage:
From the Editor:
Under OEd, the Compiler may simply be started by selecting the ' Compile'
function.
From the CLI:
First, use the CD command to make the directory containing the source
files, or the 'txt' subdirectory, the current directory.
Usually, the Compiler needs a stack area larger than 4K bytes. Therefore,
you should set the stack size to a value between 10,000 and 20,000 bytes.
Now the Compiler may be started using the following syntax:
Oberon { [-svbcrnotpzmd1238igy]
[SET | CLEAR <option>]
<source text> }
<source text> stands for the text file to be compiled. The extension '.
mod' may be omitted. If the source text is located in subdirectory ' txt',
it will be picked up from there. Thus, instead of
Oberon txt/Test.mod ,
you can simply type
Oberon Test .
You may specify several source text files; in this case, the files will be
compiled in sequence.
Options always refer to all source text files specified on their right
hand side. They have the following effects:
Option Effect
'-s' disable stack control
'-v' disable overflow control
'-b' disable scope control
'-c' disable case index control
'-r' disable return control
'-n' disable nil pointer control
'-o' enable odd address control
'-t' disable type control
'-p' disable register parameters and variables
'-z' set local variables to zero
'-m' use small code model
'-d' use small data model
'-1' generate code specifically for 68010 processor
'-2' generate code specifically for 68020 processor
'-3' generate code specifically for 68030 processor
'-8' generate code for floating point unit (68881/68882)
'-i' generate icons
'-g' generate debugging information
'-y' do not generate new symbol file
All object files supplied with this demo version are compiled using the
small data model. This is why you have to use this data model, too. You
have to specify the option '-d' when starting the compiler.
Providing an option several times will toggle its function on or off each
time it's given.
SET <option> and/or CLEAR <option> allow you to set and/ or clear options
for conditional compilation.
Options only refer to the source text files to the right. Example:
Oberon -sv Prog1 -bs Prog2
In this case, Prog1 will be compiled without stack and without overflow
control, and Prog2 without scope control and without overflow control but
with stack control.
If you start the Compiler without any parameters, it will prompt you with
'in>', and wait for you to type a source text file name. You may
alternatively skip compilation altogether simply by pressing the Return key.
From the Workbench:
If you wish to start the Compiler from the Workbench, then you must first
shift-select all source text files, and then double-click on the Compiler'
s icon.
You should not start the Compiler from the Workbench without shift-
selecting source files first, unless you want the Compiler to store object
and symbol files in its home directory. This is normally not what you want.
Tool types are available for all CLI options discussed above. They may be
specified or modified by selecting Workbench menu item 'Information' or
'Info' after selecting the Compiler's icon. The following paragraph lists
all tool types and their corresponding CLI options:
Tool Type Corresponding CLI Option
STACKCHK -s
OVFLCHK -v
RANGECHK -b
CASECHK -c
RETURNCHK -r
NILCHK -n
ODDCHK -o
TYPECHK -t
AUTOREGPARS -p
CLEARVARS -z
SMALLCODE -m
SMALLDATA -d
MC68010 -1
MC68020 -2
MC68030 -3
MC68881 -8
ICONS -i
DEBUG -g
NEWSYMBOLS -y
Compiler Operation:
The Compiler keeps you informed about the files which it is manipulating
at any point in time, by displaying ' - < file name>' whenever it is
reading a file, and ' + <file name>' whenever it is generating a file.
First, the external symbol files of all imported modules are loaded. For
each of these modules, the Compiler displays ' - XXX.sym'. As soon as all
import modules are loaded, the Compiler starts generating code. For each
kilobyte of code generated, a dot is displayed.
If the program currently being compiled makes use of REAL or LONGREAL
numbers, then the external symbol files of the mathematics modules are
also loaded.
Once the source text is compiled, the Compiler checks if a new external
symbol file must be generated. In order to achieve this, it reads the old
external symbol file, if it exists, and compares it to the one to be
generated. If it detects differences, then it generates a new external
symbol file called 'XXX.sym', or ' sym/ XXX. sym', if subdirectory ' sym'
exists.
Subsequently, the code is optimized in about two to eight additional
passes. In this phase, the Compiler displays ' optimizing ...' and the
number of bytes saved. Eventually, the optimized code is saved in Amiga
compatible object code format under the name 'XXX.obj', or ' obj/ XXX. obj',
if subdirectory 'obj' exists.
Finally, the sizes of the code, data, and BSS segments are displayed.
If any errors are detected during compilation, file XXX.modE is generated,
and appropriate entries are made. The error messages may subsequently be
viewed using OEd or OErr.
Compilation Example:
in> Demo
- Demo.mod
- OBERON:sym/Graphics.sym
- OBERON:sym/Hardware.sym
- OBERON:sym/Exec.sym
- OBERON:sym/Intuition.sym
- OBERON:sym/KeyMap.sym
- OBERON:sym/Timer.sym
- OBERON:sym/InputEvent.sym
- OBERON:sym/Dos.sym
- OBERON:sym/OberonLib.sym
.. - sym/Demo.sym
optimizing ... 80
optimizing ... 10
optimizing ... 0
+ obj/Demo.obj
CODE: 2368 DATA: 0 BSS: 1760
This reflects a compilation of the program 'Demo.mod'.
Special features of the compiler:
Amiga Oberon-2 supports three different set types: SHORTSET, SET and
LONGSET. Their sizes are 8, 16 and 32 bits, respectively.
Following the BEGIN-statement-sequence, every module may have a CLOSE-
statement-sequence. These statements are executed on termination of the
program. They should be used to free resources allocated by the module.
Pointer types may be declared as 'UNTRACED POINTER TO ...'. These pointers
are not traced by the garbage-collector. They may eg. be used to reference
structures of the AmigaOS.
Pointer types may be declared as 'BPOINTER TO ...'. These pointers may be
used to directly access some structures used by the Dos-Library.
To access C-Structures within Oberon-2 programs you have to use the type
STRUCT. STRUCT is used similarly to RECORD. Compared to RECORDs, STRUCTs
contain no hidden type-information.
Amiga Oberon-2 knows a new standard procedure DISPOSE(). It may be used
to free memory allocated for an UNTRACED POINTER using the standard
procedure NEW().
The module SYSTEM defines the type BYTE, ADDRESS and the procedures ADR,
LSH, ROT, INLINE, REG, SETREG, VAL, INIT, TYPEDESC and ALLOCATE.
Amiga Oberon-2 allows structured function results (arrays or records).
You may directly access a function result with Amiga Oberon-2, so a call
'Proc().x' is possible, if Proc() returns a pointer to a record with an
element 'x'.
Amiga Oberon-2 allows an arbitrary number of parameters for some routines
of the AmigaOS:
Dos.PrintF("a=%ld b=%ld c=%ld\n",a,b,c);
Intuition.OpenWindowTags(newwindow,
Intuition.waWidth, 500,
Intuition.waHeight,200,
Intuition.Title, SYSTEM.ADR("Tag-List-Demo"),
Utility.end);
Compiler options:
You may modify compiler options within comments. The options start with
a dollar sign '$' followed by their name and one of the character '+',
'-' or '='. '+' sets the option, '-' clears it and '=' resets it to the
value before the last '+' or '-'.
Example:
(* $OvflChk- *)
checksum := checksum + x;
(* $OvflChk= *)
Here overflow check is disabled for one statement and reset after this
statement. You may specify the following options:
Name Opt Tool-Type Default may be nested? relation
StackChk -s STACKCHK TRUE yes
OvflChk -v OVFLCHK TRUE yes
RangeChk -b RANGECHK TRUE yes
CaseChk -c CASECHK TRUE yes
ReturnChk -r RETURNCHK TRUE yes
NilChk -n NILCHK TRUE yes
OddChk -o ODDCHK FALSE yes
TypeChk -t TYPECHK TRUE yes
ClearVars -z CLEARVARS TRUE yes
Debug -g DEBUG FALSE yes
EntryExitCode TRUE no procedure
CopyArrays TRUE no procedure
SaveRegs FALSE no procedure
SaveAllRegs FALSE no procedure
DeallocPars TRUE no procedure
Implementation TRUE no module
CodeChip FALSE no module
VarsChip FALSE no module
DataChip FALSE no module
Conditional Compilation:
When starting the compiler, you may set or clear options for conditional
compilation using the shell arguments 'SET <option>' or 'CLEAR <option>',
respectively. These Options may also be set within comments using
(* $SET <option> *) or (* $CLEAR <option> *). You may ask the state of
one of these options with '$IF <option>', '$IFNOT <option>', '$ELSE'
and '$END'. Example: The module
MODULE Test;
IMPORT io;
BEGIN
(* $IF English *)
io.WriteString("bye!");
(* $ELSE *)
io.WriteString("tschüß!");
(* $END *)
io.WriteLn;
END Test.
yields 'bye!' when compiled using 'Oberon SET English Test'. It prints
'tschüß!' if the compiler was called as 'Oberon CLEAR English Test'.
OLink:
OLink links the object files create by the compiler to an executable
program.
If you are using the Workbench, you may start OLink by double clicking the
icon of your program's main module object file.
OLink's shell usage is:
OLink [-smdai] <objectfile>
<objectfile> is the name of the main module object file created by the
compiler.
The options have the following effects:
-s All hunks of same type should be merged
-m should be set when you are using the small code model
-d must be set when you are using the small data model
-a must be set when you are not using the garbage-collector
-i create icons
This demo version only includes the object files for the small data model,
you will have to set the option '-d' when linking a program.
OErr:
You may use OErr to report errors detected by the Compiler.
Usage: OErr {source}.
ODebug:
This run-time source-level debugger is a useful tool for developing
programs with the Amiga Oberon-2 System. For beginners, it provides an
insight into program execution, and for advanced software developers, it
is indispensable.
This debugger provides the same degree of luxury as a language interpreter
for the Oberon-2 programmer. Many functions are available which support eg
single step execution, investigation of local and global variables, and
setting breakpoints anywhere in the source text.
Hardware Requirements:
ODebug requires an Amiga Series Computer with a minimum of 1.5MB of memory
and two floppy disk drives, or a hard disk drive. For the development of
larger programs consisting of many different modules, more memory should
be available.
ODebug has been developed especially for use under AmigaOS 2. 0, but may
also be used under AmigaOS 1. 2 or 1. 3 without any problems. Its
appearance under AmigaOS 2.0 is more attractive, though.
Debugger Usage:
First, all modules of a program which shall be displayed under the
Debugger must be compiled with option '-g'. If you intend to start the
Compiler from the editor OEd, you must first select option Debug ( Options
menu). In either case, the Compiler will automatically import module '
Debug' and generate special code for displaying compiled modules under the
Debugger. Furthermore, the Compiler generates reference files ( with
extension '.ref') containing additional, vital information for ODebug. If
subdirectory 'ref' exists in the current directory, the reference files
will be stored in that subdirectory.
After compilation of all modules, the program must be linked with OLink,
just like a "normal" Oberon-2 program.
From the CLI:
Before starting ODebug, you should increase the stack size by typing
'stack 20000'. Subsequently, you should start the Debugger as a background
task (using the run command) in order to avoid a ' hanging' CLI window.
You may specify options, similar to those of the editor OEd:
run ODebug {-{x#|y#|w#|h#|d#|s|l|p|r|c|o|1#|2#|3#|4#}}
Character '#' stands for a decimal number. The options have the following
meanings:
-x#, -y# top left position of ODebug windows
-w#, -h# width and height of ODebug windows
-s open separate screen
-l open interlace screen
-d# screen depth (default = 2)
-p deactivate 'popup windows'
-r activate 'sort records'
-c activate 'close pointers'
-o do not open all source text windows automatically
-1#, -2# top left position of standby window
-3#, -4# width and height of standby window
More details about the last four options can be found in the section about
the Options menu.
From the Workbench:
From the Workbench, you may start ODebug simply by double- clicking its
icon. Options may be specified via tool types. They may be modified by
selecting Workbench menu item 'Information' or 'Info' after selecting the
Debugger's icon:
LEFTEDGE left position of ODebug windows
TOPEDGE top position of ODebug windows
WIDTH width of ODebug windows
HEIGHT height of ODebug windows
SCREEN open on separate screen ('TRUE') or on Workbench screen
('FALSE')
INTERLACE open interlace screen ('TRUE') non- interlace screen
('FALSE')
DEPTH depth of ODebug screen
POPUPWINDOWS set ('TRUE') or clear ('FALSE') option 'popup windows'
SORTRECORDS set ('TRUE') or clear ('FALSE') option 'sort records'
CLOSEPOINTERS set ('TRUE') or clear ('FALSE') option 'close pointers'
OPENSOURCES open all source text windows at program start ('TRUE'), or
display only required source texts ('FALSE')
STANDLEFTEDGE left position of standby window
STANDTOPEDGE top position of standby window
STANDWIDTH width of standby window
STANDHEIGHT height of standby window
The last four tool types refer directly to the defaults of the Options
menu discussed further below.
ODebug Operation:
First, ODebug opens a small window displaying the message " Please start
program compiled with option '- g'!". Hence, you should start now the
executable program. It does not matter whether you start it from the CLI
or from the Workbench, with or without parameters. As soon as your
program begins, the Debugger closes its initial window, and, for each
module compiled with option '-g', opens a new window and displays the
corresponding source text. The statement about to be executed is
highlighted. The Debugger's menus now give you full control over program
execution: You can select single step execution, or you can run a part of
the program until certain conditions are met which you have specified
before. Such conditions can be given as breakpoints, specific variable
values, or even as run time errors.
When the initial window is displayed, you can leave the Debugger simply by
selecting the window's close gadget.
ODebug windows are equipped with proportional and arrow gadgets at their
right and bottom borders, just like Workbench windows, so that you can
display any part of the represented information. This window organization
is provided in a uniform way.
Each window can be closed at any time by selecting its close gadget. The
Debugger remains active as long as at least one window displaying the
source text of a module is still opened. Selection of the close gadget of
the last source text window is treated like the selection of the Abort
Debug option in the Project menu (see below).
As soon as the program attempts to execute a statement of a module, of
which the corresponding source text window has previously been closed, the
window will be reopened. This is the case eg whenever a procedure of a
different module is called, and the source text of that module is
currently not displayed.
The Menus:
The Project Menu:
Abort Debug (Amiga + 'A'):
The current program is terminated immediately. The Debugger deallocates
all memory areas for the source texts and the reference files, and closes
all windows. Subsequently, the initial window is redisplayed, and the
Debugger waits until the next program is started, or until the user
decides to terminate the Debugger by selecting the initial window's close
gadget.
The Abort Debug option does not automatically free resources, like windows
or allocated memory. The program currently being debugged is responsible
for this.
If there are severe errors in a program's CLOSE part, Abort Debug may even
lead to a system failure.
Quit (Amiga + 'Q'):
Quit terminates the current program, just like Abort Debug. Subsequently,
the Debugger itself is terminated, too. In this case, ODebug must be
restarted if you wish to debug another program.
About:
A window is opened displaying information about the version and the author
of this Debugger.
The Debug Menu:
Step (Amiga + 'S', Space Bar):
Step executes the current, highlighted statement. Subsequently, the
logically following statement to be executed is highlighted, and selecting
Step again will execute it etc. If the current statement is a procedure
call, then the following statement is the first statement of that
procedure, the text of which is then also displayed by the Debugger.
This function allows you to work your way through your program step by
step, and to detect errors and/or unwanted execution paths.
Walk (Amiga + 'W'):
Walk allows you to follow program execution in a manner similar to Step.
However, statements are highlighted and executed automatically in
sequence. Between statements, the Debugger pauses for 0.2 seconds, so
that you can easily follow program execution.
You can interrupt Walk at any time by pressing the left mouse button
whilst pointing to a window, or by selecting a menu item.
Walk also terminates upon reaching a breakpoint ( refer to discussion of
Breakpoint menu), or if a run- time error occurs. In either case, a
requester is displayed providing information about the reason for the
interrupt.
Run (Amiga + 'R'):
Run executes the program even faster than Walk, starting with the current
statement. You cannot follow execution on-screen. Run can be interrupted
in exactly the same manner as Walk.
Execute (Amiga + 'X'):
Just like Step, Execute executes the current, highlighted statement.
However, execution is terminated only after reaching the textually
following statement. Thus, if the highlighted statement is a procedure
call, the whole procedure is executed, unless a breakpoint is encountered
or a run-time error occurs. Similarly, if the current statement is a loop
statement, the whole loop is executed.
Like Walk and Run, Execute may be interrupted by pressing the left mouse
button or selecting a menu item. Also, breakpoints and run-time errors
terminate program execution.
Run Quick (Amiga + 'K'):
Often, a program which has been started by selecting Run is still fairly
slow. Run Quick allows you to execute a program faster, until a
breakpoint or a run-time error is encountered.
Note, however, than Run Quick cannot be interrupted by pressing the left
mouse button, or by selecting a menu item. Furthermore, Run Quick ignores
breakpoint expressions entered via option Add Expression of the Breakpoint
menu.
Run Quick can be used eg for fast execution of large initialization parts
of a program. Make sure, though, that at least one breakpoint is defined,
so that control is returned to the Debugger.
Sprint (Amiga + 'I'):
Sprint allows you to quickly find statements generating run-time errors.
The overhead caused by the extensive checks performed when the program is
executed via Run, can dramatically slow down program execution. Sprint,
on the other hand, virtually executes the program in real time mode. Note
that Sprint is only terminated by run-time errors. If a run-time error
occurs, the statement causing it is highlighted. Also, Sprint allows you
to investigate the values of global variables, but not of local variables,
and the calling sequence of procedures cannot be inspected (see discussion
of Variables menu).
A program looping endlessly should not be started using Sprint, because it
cannot be interrupted any more.
Show Source (Amiga + 'H'):
Windows displaying source texts can be closed by selecting the close
gadget. Also, starting ODebug with option '- o' or with tool type
"OPENSOURCES" set to 'FALSE' prevents displaying all source texts.
If you wish to investigate a source text which is not currently displayed,
you can select Show Source. A window is opened which allows you to select
a module, either via double-click, or by clicking on a module name once,
and selecting the 'ok' gadget.
Now a corresponding window is opened, or, if such a window is already
open, it is activated and moved to the foreground.
Show Statement (Amiga + 'N'):
The gadgets at the bottom and right borders of a source text window are
provided for fast movement through the text. If you are not sure where
exactly the current, highlighted statement is located, or you wish to
return to the current statement as fast as possible, then select Show
Statement.
If the window associated with the source text which contains the current
statement is not open, then it is opened automatically.
The Breakpoint Menu:
A statement displayed in boldface represents a breakpoint. A program
started with Walk, Run, or Execute is interrupted just before the
execution of a statement marked in that way.
In addition to breakpoints at fixed positions in the text, this Debugger
allows you to specify boolean expressions as interrupt criteria.
Set (Amiga + 'T'):
Set allows you to specify a breakpoint. First, you must select a
statement with the mouse by pressing the left mouse button. Note that
statements may be nested. Eg the line
IF a>b THEN a := b END;
consists of an assignment statement (' a := b') and the whole IF
statement. If you define 'a := b' as a breakpoint, the program is only
interrupted if condition 'a>b' holds. However, if you define the whole IF
statement as a breakpoint, the program is interrupted each time this
statement is reached.
The reserved words END, CLOSE, UNTIL, ELSE, and ELSIF, and delimiter '|'
may also be selected to specify a breakpoint. In this way, you can eg
interrupt a procedure after execution of its last statement in order to
investigate the values of the local variables just before leaving their
scope (also see Variables menu).
Defining keyword END in the IF statement above as a breakpoint would lead
to a program interrupt straight after execution of 'a := b'.
Remove (Amiga + 'M'):
To remove a breakpoint, first select the corresponding statement with the
left mouse button, and then select Remove.
Alternatively, you can simply double-click on a statement with the left
mouse button to set a breakpoint, or to remove it, if this statement
already defines a breakpoint.
Add Expression (Amiga + 'D'):
This menu item allows you to define conditions for program interruption
via boolean expressions. A window with a string gadget is opened where
you can enter an arbitrary boolean expression in Oberon-2 syntax. You can
make use of all variables and constants of this module and all imported
modules which are visible in the current context. The result of the
expression must be of type BOOLEAN. If it becomes TRUE, then the program
is interrupted.
Example:
(x>Window.width) OR (y>Graphics.gfx.normalDisplayRows)
This expression will interrupt the program if x becomes greater than the
width of window Window, or if y becomes greater than the maximum intuition-
supported viewport height. In this case, the variables x, y, and Window
must be defined in the current module, which also must import module
Graphics.
Pressing the Return key in the string gadget will display the current
value of the boolean expression.
The boolean gadget No break on error/Break on error allows you to specify
whether an error on evaluating the boolean expression shall lead to a
program interrupt or not. If Break on error is selected, then the
expression above would also cause a program interrupt if eg Window = NIL
holds. Likewise, calling a procedure would lead to an interrupt, if x and
y are local variables, and hence no longer visible.
Selecting 'ok' stores the expression as a new interrupt criterion. You
may specify any number of criteria.
Selecting 'Cancel' allows you to leave the window without changing the
list of interrupt criteria.
If a program is interrupted because a boolean expression becomes TRUE,
then a window is opened giving details about the cause of the interrupt,
and allowing you to remove the criterion from the list (by selecting
'remove'), or to keep it (by selecting 'Cancel').
Change Expression (Amiga + 'J'):
This menu item allows you to modify an interrupt criterion previously
specified via Add Expression. First, a window is opened which displays
all currently existing criteria. Selecting one of them causes the same
window to be opened as for Add Expression.
Remove Expression (Amiga + 'O'):
With Remove Expression, you can remove an interrupt criterion by selecting
it from the list displayed, and clicking the 'remove' gadget.
Clear All (Amiga + 'C'):
Selecting this menu item removes all breakpoints and interrupt criteria.
The Variables Menu:
Show (Amiga + 'V'):
With Show, you can inspect the current values of the variables within the
scope of a module or a procedure. A window is opened which allows you to
select a scope. Scopes are identified by the names of the modules
defining them. The global variables of the current module are called '
Globals: Module name', and the local variables of an active procedure are
called 'Locals: Procedure name'.
After selecting a scope, a window is opened each line of which shows the
name, the value, and the type (in square brackets) of a variable. Values
of structured variables cannot be displayed on a single line, and are
therefore indicated via ' ARRAY ...' or ' RECORD ...', respectively. A
double-click on such a line causes a new window to be opened which
displays the values of the array or record elements. The values pointed
to by a pointer can be inspected in a similar fashion. All variables the
values of which may be inspected via double- click are marked by an
ellipsis ('...'). In this way, you can easily work your way through
complex structures like trees and lists. If a pointer has value NIL or an
odd value, a requester with a warning is displayed.
Windows displaying values of variables which are no longer needed may be
closed at any time by selecting the close gadget.
Extend (Amiga + 'E'):
This menu item can be selected only if the active window displays the
contents of a RECORD. If this is an extended RECORD, then the next
extension level and the corresponding field elements are added to the
display window. If the RECORD is not extended, or if the type of
extension cannot be determined from the current module, then a
corresponding message is displayed.
Change Value (Amiga + 'G'):
Change Value allows you to modify the value of a previously selected
variable. You may specify an arbitrary expression the result of which is
assigned to the variable. Of course, the result of the expression must be
assignment compatible.
You should be very careful when changing variable values explicitly,
because they might lead to an unexpected program behaviour.
Evaluate Expression (Amiga + 'U'):
This menu item allows you to evaluate arbitrary expressions including
variables and constants of the module being debugged. You may specify any
valid Oberon expression. However, calls to functions other than standard
functions are not permitted. You can use any standard Oberon-2 type
(INTEGER, SET, REAL, BOOLEAN etc). The result and its type will be
displayed.
Examples:
a + b * 3 MOD 45 -ENTIER(a * 3.124 / b)
(b IN (set1 * set2)) OR (node IS ExtendedNode)
ODD(Intuition.int.activeScreen.rastport.bitMap.bytesPerRow)
An erroneous expression results in a corresponding error message.
Expression evaluation may be terminated by selecting the 'Cancel' gadget.
Change Type (Amiga + 'Y'):
It is possible to change the type of a variable, which is similar to using
procedure VAL() of module SYSTEM. Hence, the new type should have the
same size as the original type. Type modification is for display purposes
only, though, and it does not affect the program being debugged in any way.
To select a type, you must first select the scope of the type identifier
in a separate window. 'Standard identifiers' denotes the standard Oberon-2
type identifiers. Finally, you must select the type itself.
Show active Procedures (Amiga + 'P'):
This function opens a window displaying the names of all procedures which
are currently active, ie the procedures the local variables of which are
visible.
Show called Procedures (Amiga + 'L'):
This function opens a window displaying the names of all procedures called
in the order in which they have been called. A recursion, for instance,
can be traced back easily in this way.
Save Contents:
The contents of a window displaying variable values or procedure
identifiers may be printed or saved to an ASCII file using this function.
First, you are prompted for a file name. If you specify 'PRT:', the
window contents are printed. Note that the whole contents of a window are
printed or saved, and not just the currently visible part. Since the
saved file is an ASCII file, it may subsequently be edited, or output
using CLI command TYPE.
The Options Menu:
Popup Windows (Amiga + '0'):
If this option is selected, then a change of modules, eg calling a
procedure of a different module, will cause the window of the destination
module to be brought to the foreground. This is quite practical in
particular if several modules are being debugged at the same time.
Sort RECORDs (Amiga + '1'):
Selecting this option results in RECORD fields being displayed in
alphabetical order. Otherwise, fields are displayed in the order in which
they are defined.
Close Pointers (Amiga + '2'):
Usually, all windows displaying values of RECORDs, ARRAYs, or of any
aggregate pointed to by a pointer, are closed automatically if control is
returned to the program being debugged ( via Step, Walk etc). This is
necessary because the values displayed may become invalid, eg if memory is
released by the program.
De-selecting option Close Pointers causes such windows to remain open, so
that you do not need to reopen them. It is not guaranteed, though, that
the values displayed are still valid.
Open Sources (Amiga + '3'):
If this option is disabled, then the automatic display of the source texts
of all modules making up the program being debugged is prevented. Rather,
only those windows are opened which display statements the execution of
which is imminent.
Disabling this option is important for programs consisting of many
different modules, in order to avoid memory allocation problems. If you
wish to display a source text not currently displayed, you can still
select Show Source from the Debug menu.
Copyright:
This disk may be distributed freely without alternations, free of charge.
The programs and the files on this disk may not be altered. Altered
versions of these programs may neither be used nor distributed.
These programs may only be distributed together with this disk. Ie it
it is not permitted to copy and distribute just the editor, despite the
fact that it is fully functional without the compiler.
The texts by Niklaus Wirth and Hanspeter Mössenböck may be distributed on
their own, and eg be uploaded into bulletin boards. But they may not be
altered, and it should be ensured by an appropriate note that they will not
be altered.
All other files are © 1989-1992 by
Fridtjof Siebert
Nobileweg 67
D-7000 Stuttgart 40
Germany
siebert@minnie.informatik.uni-stuttgart.de
fridi@amokst.adsp.sub.org
2:2407/106.6
Any unlawful use of these files will be prosecuted.
I will always be grateful for any information on bugs in my programs. I
cannot guarantee that I will find time to answer all correspondence. So
please direct all queries to A+L AG, and don't keep me unnecessarily from
programming. I won't answer any questions by telephone.
The author will not be held liable for the correctness and functionality
of the programs and files. Also, the author is not liable for any damages
incurred through the use of the programs and the files.
Full Compiler Version:
The fully functional compiler version may be ordered directly from
A+L AG
Im Däderiz 61
CH-2540 Grenchen
Switzerland
Phone: + 41 / 65 / 52 03 11
Fax : + 41 / 65 / 52 03 79
in Germany, you may get the german version of the compiler and the debugger
from
ABF Computer
Postfach 14 25
7120 Bietigheim-Bissingen
Germany
Phone/Fax: + 49 / 71 42 / 3 33 92
This version will be supplied with comprehensive documentation, further
auxiliary programs, many library modules and a complete interface to
the Amiga's system routines (version 2.04.
Contents of the commercial version:
The standard package consists of the following files:
Oberon the Compiler
OEd the Editor
OLink the Linker
OErr the error lister
OMake the make utility
ModToDef tool to automatically generate definition files
ResidentManager tool to keep symbol files resident in memory
LibLink library- and device-linker. This linker allows you
to write Amiga-libraries and devices in Oberon-2
GarbagePrefs preferences editor for the garbage-collector
GCStat program to display the garbage-collector's activity
sym/obj (dir) symbol- and objectfiles of all Amiga-interface- and
all
library-modules (altogether more than 100 modules)
Interfaces (dir) Source texts of all Amiga-interface-modules (more
than 50 modules)
Module (dir) source texts of all library modules (nearly 50
moduls)
The manual that comes with the commercial version has more than 400 pages.
The debugger package includes the following programs:
ODebug the Debugger
DecObj a disassembler for object files and executables
XRef a cross reference lister for Oberon-2
Additionally, the debugger package comes with special versions of the
compiler, editor, etc. that have been optimized for the processors MC68020
and the FPU MC68881/2.
The latest version of Amiga Oberon-2 (V3.0) is currently (december 1992)
not available with an english manual. An english version for Amiga Oberon
(V2.0) is available. It will hopefully be translated to english soon
(the translation will not be done by me, so there will be fewer language
mistakes, I hope).
If you're interested in an english version, send a request to A+L. Many
requests for the english version will probably accelerate the translation.
I hope you'll have much fun and success programming in Oberon-2!
--- Fridtjof